﻿package com.dykj.platform.iadapter.tags;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.components.Component;
import org.apache.struts2.views.jsp.ComponentTagSupport;

import com.opensymphony.xwork2.util.ValueStack;
public class SelectTags extends ComponentTagSupport{
	private String name;
	private String value;
	private String editable;
	private String path;
	private String filepath;
	private String model="true";

	@Override
	public Component getBean(ValueStack arg0, HttpServletRequest arg1, HttpServletResponse arg2) {
		this.setFilepath(arg1.getSession().getServletContext().getRealPath("/"));
		return new Select(arg0);
	}
	
	//	获得参数  
    protected void populateParams() {  
        super.populateParams();  
        Select s = (Select)component;
        s.setPath(path);
        s.setEditable(editable);
        s.setName(name);
        s.setValue(value);
        s.setWebpath(filepath);
        s.setModel(model);
    }  
    
	public String getEditable() {
		return editable;
	}
	public void setEditable(String editable) {
		this.editable = editable;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}
	public String getFilepath() {
		return filepath;
	}

	public void setFilepath(String filepath) {
		this.filepath = filepath;
	}
	public String getModel() {
		return model;
	}

	public void setModel(String model) {
		this.model = model;
	}
}
